home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / versedit.zip / CLE.BAT < prev    next >
DOS Batch File  |  1987-09-07  |  2KB  |  58 lines

  1. echo off
  2. ECHO  This sample batch procedure compiles, links and executes a program.
  3. ECHO  In case of a compiler error, this procedures executes VersiEdit
  4. ECHO  with your source code file in the first window and the error messages
  5. ECHO  in the second window.
  6. ECHO  
  7. ECHO  This procedure is set up for Lattice "C" compiler.  It must be modified
  8. ECHO  to reflect your programming environment as indicated by remarks in the
  9. ECHO  text of the procedure.
  10. goto end
  11. echo off
  12. REM  After modification, this procedure is executed by entering at DOS prompt:
  13. REM  CLE "file", where "file" is the name of your source code file without the
  14. REM  file name extension.  For example, if your source code file name is
  15. REM  MAIN.FOR, enter: CLE MAIN.  The "file" is also the value of the %1
  16. REM  parameter in this procedure.
  17. REM
  18. REM  MODIFICATION INSTRUCTIONS:
  19. REM
  20. REM  1.  Make sure that this file is backed up.
  21. REM  2.  Remove the initial lines up to and including "goto end".
  22. REM  3.  Change "lc -ms -ccdmsuw" on the executable line following ":beg"
  23. REM      to the text that  will execute your compiler with your parameters.
  24. REM      Do not change the remainder of that line.
  25. REM  4.  Change ".c" on the "e %1.c err.msg" line to the file name extension of
  26. REM      your source code file.  For example, if your source code file name is
  27. REM      MAIN.FOR, ".c" should be changed to ".FOR".  This line executes
  28. REM      VersiEdit, assuming that it is either in the current directory or its
  29. REM      directory is contained in your PATH environment variable.
  30. REM  5.  Change the link statement to your usual link statement.  Remember
  31. REM      that %1 contains the name of your source code file without its
  32. REM      extension.
  33. REM
  34. REM  ** END OF MODIFICATION INSTRUCTIONS **
  35. :beg
  36. REM  Execute compiler directing the error messages to err.msg
  37. lc -ms -ccdmsuw %1 >err.msg
  38. if not errorlevel 1 goto lnk
  39. REM  An error has occurred.  Execute VersiEdit to edit/view the source code and
  40. REM  error message files.
  41. e %1.c err.msg
  42. REM  Allow exit from the loop.
  43. echo  
  44. echo  
  45. echo ** Press ^C to Abort, Any Other Key to Continue **
  46. pause
  47. goto beg
  48. :lnk
  49. REM  Display the error message file.  It may contain warning messages that
  50. REM  did not trigger the error processing loop.
  51. type err.msg
  52. REM  Link program
  53. link \lc\s\c+%1,%1,%1/m,\lc\s\lc
  54. if errorlevel 1 goto end
  55. REM  Execute the linked program.
  56. %1
  57. :end
  58.